import { lazy } from "react";
import {
    AppOutline,
    AppstoreOutline,
    MessageOutline,
    UserOutline
} from 'antd-mobile-icons'

const Index = lazy(() => import('../pages/index'))
const Class = lazy(() => import('../pages/class'))
const Message = lazy(() => import('../pages/message'))
const User = lazy(() => import('../pages/user'))
const Home = lazy(() => import('../pages/home'))
const Login = lazy(() => import('../pages/login'))
const Register = lazy(() => import('../pages/register'))
const List = lazy(() => import('../pages/list'))
const Detail = lazy(() => import('../pages/detail'))
const Seat = lazy(() => import('../pages/seat'))
const Order = lazy(() => import('../pages/order'))
const Success = lazy(() => import('../pages/success'))
export const homeRouters = [
    {
        path: '/',
        element: <Index></Index>,
        title: '首页',
        icon: <AppOutline />
    },
    {
        path: '/class',
        element: <Class></Class>,
        title: '分类',
        icon: <AppstoreOutline />
    },
    {
        path: '/messageg',
        element: <Message></Message>,
        title: '消息',
        icon: <MessageOutline />
    },
    {
        path: '/user',
        element: <User></User>,
        title: '个人中心',
        icon: <UserOutline />
    },
]

export const routers = [
    {
        path: '/',
        element: <Home></Home>,
        children: homeRouters
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '/register',
        element: <Register></Register>
    },
    {
        path: '/list',
        element: <List></List>
    },
    {
        path: '/detail/:id',
        element: <Detail></Detail>
    },
    {
        path: '/seat',
        element: <Seat></Seat>
    },
    {
        path: '/order',
        element: <Order></Order>
    },
    {
        path: '/success',
        element: <Success></Success>
    },
]